package org.mat.ipaas.ucenter.service.api.monitor;

import com.alibaba.fastjson.JSONArray;
import org.mat.framework.lang.dto.MatApiResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * ActuatorRedisController
 */
@FeignClient(name = "mat-ipaas-ucenter-service",contextId = "actuator-redis-rest-api")
public interface ActuatorRedisRestAPI {

    /**
     * Redis详细信息
     * @return
     * @throws Exception
     */
    @GetMapping("/sys/actuator/redis/info")
    MatApiResponse<?> getRedisInfo() throws Exception;

	@GetMapping("/sys/actuator/redis/keysSize")
    Map<String, Object> getKeysSize() throws Exception;

	/**
     * 获取redis key数量 for 报表
     * @return
     * @throws Exception
     */
    @GetMapping("/sys/actuator/redis/keysSizeForReport")
    Map<String, JSONArray> getKeysSizeReport() throws Exception;

	/**
     * 获取redis 内存 for 报表
     *
     * @return
     * @throws Exception
     */
    @GetMapping("/sys/actuator/redis/memoryForReport")
    Map<String, JSONArray> memoryForReport() throws Exception;

	/**
     * 获取redis 全部信息 for 报表
     * @return
     * @throws Exception
     */
    @GetMapping("/sys/actuator/redis/infoForReport")
    Map<String, JSONArray> infoForReport() throws Exception;

	@GetMapping("/sys/actuator/redis/memoryInfo")
    Map<String, Object> getMemoryInfo() throws Exception;

	//update-begin--Author:zhangweijian  Date:20190425 for：获取磁盘信息
  	/**
  	 * @功能：获取磁盘信息
  	 * 
  	 * 
  	 * @return
  	 */
  	@GetMapping("/sys/actuator/redis/queryDiskInfo")
    MatApiResponse<List<Map<String,Object>>> queryDiskInfo( );
	//update-end--Author:zhangweijian  Date:20190425 for：获取磁盘信息
}
